package com.example.demozy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.ArrayList;
import java.util.Date;

/**
 * 条件单类
 * @author 张展鹏
 */
public class ConditionSheet {
    // **************** 公开变量

    // **************** 私有变量

    private String conditionSheetId;
    private String conditionSheetName;
    private int onState;
    private String authorId;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;
    private ArrayList<SheetCondition> conditions;

    // **************** 继承方法

    // **************** 公开方法


    public ConditionSheet(String conditionSheetId, String conditionSheetName,
            int onState, String authorId, Date createTime, Date updateTime) {
        this.conditionSheetId = conditionSheetId;
        this.conditionSheetName = conditionSheetName;
        this.onState = onState;
        this.authorId = authorId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.conditions = new ArrayList<>();
    }

    public String getConditionSheetId() {
        return conditionSheetId;
    }

    public void setConditionSheetId(String conditionSheetId) {
        this.conditionSheetId = conditionSheetId;
    }

    public String getConditionSheetName() {
        return conditionSheetName;
    }

    public void setConditionSheetName(String conditionSheetName) {
        this.conditionSheetName = conditionSheetName;
    }

    public int getOnState() {
        return onState;
    }

    public void setOnState(int onState) {
        this.onState = onState;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public ArrayList<SheetCondition> getConditions() {
        return conditions;
    }

    public void setConditions(ArrayList<SheetCondition> conditions) {
        this.conditions = conditions;
    }

    public void addCondition(SheetCondition sheetCondition) {
        this.conditions.add(sheetCondition);
    }

    // **************** 私有方法

}
